import http from "@/api/axios";

export const getListApi = (data: RoleAndPermission.SearchForm) => {
  return http({
    method: "post",
    url: "/base/biz/role/page",
    data
  });
};
export const addRoleApi = (data: Base.GeneraDataType = {}) => {
  return http({
    method: "post",
    url: "/base/biz/role",
    data
  });
};
export const editRoleApi = (data: Base.GeneraDataType = {}) => {
  return http({
    method: "put",
    url: "/base/biz/role",
    data
  });
};
export const getRoleInfoApi = (data: { id: string }) => {
  return http({
    method: "post",
    url: "/base/biz/role/details",
    data
  });
};
// 启用
export const enabledRoleApi = (data: { id: string }) => {
  return http({
    method: "put",
    url: "/base/biz/role/enabled",
    data
  });
};
// 禁用
export const disabledRoleApi = (data: { id: string }) => {
  return http({
    method: "put",
    url: "/base/biz/role/disabled",
    data
  });
};
